package com.usooft.metaTalent.core.system.service;

import com.usooft.framework.core.query.Page;
import com.usooft.metaTalent.core.system.entity.Employee;
import com.usooft.metaTalent.core.system.entity.EmployeeRole;
import com.usooft.metaTalent.core.system.entity.Role;
import com.usooft.metaTalent.core.system.query.EmployeeRoleQuery;
import com.usooft.metaTalent.core.system.wrapper.EmployeeRoleWrapper;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.lang.Long;

public interface EmployeeRoleService {

    // region 自动生成
    EmployeeRole get(Long id);

    Optional<EmployeeRole> find(Long id);

    List<EmployeeRoleWrapper> list(EmployeeRoleQuery query);

    Page<EmployeeRoleWrapper> page(EmployeeRoleQuery query);

    int count(EmployeeRoleQuery.Filter filter);
    // endregion

    Set<Long> listRoleIds(Employee employee);

    void grant(Employee employee, List<? extends Role> roles);
}